package com.bawei.rk_01.Room

import android.app.Application
import androidx.room.Room

class AppDBUtils {

    companion object{

        lateinit var appDataBase: AppDataBase
        fun init(application: Application){
            appDataBase = Room.databaseBuilder(application,AppDataBase::class.java,"aa")
                .allowMainThreadQueries()
                .addMigrations(Migration_1_2, Migration_2_3, Migration_3_4)
                .build()
        }

        fun getDB() = appDataBase

    }

}